<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<style>
    .clock{
        width: 500px;
        height: 500px;
        position: relative;

    }
    .clock a{
        display: inline-block;
        background-image: url('clock.jpg');
        background-size: 500px 500px;
        width: 500px;
        height: 500px;
    }
    .miao{
        width: 2px;
        height: 375px;
        /* background-color: #000; */
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: auto;
        /* ***** */
        animation: miao 60s linear infinite ;
    }
    @keyframes miao {
        0%{
            transform: rotate(0deg);
        }
        50%{
            transform: rotate(180deg);
        }
        100%{
            transform: rotate(360deg);
        }
    }
    .miao span{
        display: inline-block;
        width: 100%;
        height: 55%;
        background-color: red;
    }
    .fen{
        width: 4px;
        height: 300px;
        /* background-color: #000; */
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: auto;
        animation: fen 3600s linear infinite ;
    }
    @keyframes fen {
        0%{
            transform: rotate(0deg);
        }
        50%{
            transform: rotate(180deg);
        }
        100%{
            transform: rotate(360deg);
        }
    }
    .fen span{
        display: inline-block;
        width: 100%;
        height: 55%;
        background-color: blue;
    }
    .shi{
        width: 6px;
        height: 250px;
        /* background-color: #000; */
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: auto;
        animation: shi 43200s linear infinite ;
    }
    @keyframes shi {
        0%{
            transform: rotate(0deg);
        }
        50%{
            transform: rotate(180deg);
        }
        100%{
            transform: rotate(360deg);
        }
    }
    .shi span{
        display: inline-block;
        width: 100%;
        height: 55%;
        background-color: pink;
    }
</style>
<body>
    <div class="clock">
        <a href="#"></a>
        <div class="miao">
            <span></span>
        </div>
        <div class="fen">
            <span></span>
        </div>
        <div class="shi">
            <span></span>
        </div>
    </div>
    <script>
    var hours=document.querySelector('.shi')
    var mins=document.querySelector('.fen')
    var seconds=document.querySelector('.miao')

        var now = new Date();
        var hour = now.getHours();
        var min = (now.getMinutes());
        var second = (now.getSeconds());

        seconds.style.animationDelay='-'+second+'s';
        mins.style.animationDelay='-'+(min*60+second)+'s';
        hours.style.animationDelay='-'+(hour*3600+min*60+second)+'s';



    </script>
</body>
</html>